import { post, download } from '@/utils/request'
// 保存大屏设计
export const insertDashboard = p => post(`/service-report/reportDashboard/v1/insertDashboard`, p)

// 预览、查询大屏详情
export const detailDashboard = p => post(`/service-report/reportDashboard/v1/detail/${p.reportCode}`, p, 'get')

// 导入大屏
export const importDashboard = p => post(`/service-report/reportDashboard/v1/import`, p)

// 获取动态数据
export const getData = p => post(`/service-report/reportDashboard/v1/getData`, p)

// 导出大屏
export function exportDashboard(params, fileName) {
  return download(`/service-report/reportDashboard/v1/export`, params, fileName)
}
